Skip to content

feat: implement SSH server - #3

Closed
loris-catalano wants to merge 1 commit into
masterfrom
feat/ssh
Closed

feat: implement SSH server#3
loris-catalano wants to merge 1 commit into
masterfrom
feat/ssh

Conversation

@loris-catalano

Copy link
Copy Markdown
Collaborator

This pull request introduces SSH server support, enabling users to connect to the shopping TUI over SSH. It adds SSH server implementation, handles persistent Ed25519 host key management, and updates documentation and dependencies accordingly. The changes are grouped below by theme.

SSH Server Implementation:

  • Added src/ssh_server.rs with a full SSH server implementation using russh, including per-session TUI spawning, PTY handling, and proper session lifecycle management.

Host Key Management:

  • Added src/host_key.rs to load or generate a persistent Ed25519 SSH host key in OpenSSH format, ensuring secure and repeatable server identity.

Dependency Updates:

  • Updated Cargo.toml to add dependencies for SSH support (russh, tokio, anyhow, bytes).

Documentation:

  • Updated README.md with instructions for running the SSH server, connecting via SSH, and using the local TUI mode.
  • Updated ROADMAP.md to mark the SSH server phase as complete, reflecting the new SSH capabilities.

Comment thread src/main.rs
use crossterm::{
event::{self, Event, KeyCode, KeyModifiers},
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you rewrite the whole thing lol

Comment thread src/ssh_server.rs
use crate::app::{terminal_for_ssh, App};

/// Async bridge: crossterm writes are batched on `flush` and sent on the SSH channel.
/// Pattern from russh `examples/ratatui_app.rs`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the was no examples with this pr

@moakilodash

Copy link
Copy Markdown
Member
  • it's best to avoid excessive commenting,
    we can later add an AGENTS.md or a simple CONTRIBUTORS.md for better ai integration.

  • there was no need to create a new app.rs

other than that this looks good to me,
i would've asked you to open the pr over to a dev branch first and closed the pr,
but since we're switching to python and textual at the end, i have created a new branch called rust-prototype.

resolve the mentioned critiques, and open a new pr against that branch.
thanks for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants